<%-- 
    Document   : express
    Created on : 2018-5-25, 21:10:02
    Author     : Dannis
--%>

<%@page import="com.antexpress.common.Const"%>
<%@page import="com.antexpress.pojo.Employee"%>
<%@page import="com.antexpress.bean.Authentication"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Express -- AntExpress</title>
        <link rel="shortcut icon" href="static/img/ant-logo.png">
        <link href="static/css/style.css" rel="stylesheet" type="text/css"/>
        <link href="static/css/normalize.css" rel="stylesheet" type="text/css"/>
        <link href="static/css/default.css" rel="stylesheet" type="text/css"/>
        <link href="static/dist/css/jquery.secretnav.css" rel="stylesheet" type="text/css"/>
        <link href="static/css/demo.css" rel="stylesheet" type="text/css"/>
        <link href="static/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css"/>
        <link href="static/css/edbox.css" rel="stylesheet" type="text/css"/>
        <link href="static/css/selectpage.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <!--作为中转站然后跳转不同的角色的物流页面
        因为并不知道是什么角色，接口是一个express页面-->
        <%
            if (!Authentication.isLogin(session)) {
                response.sendRedirect("index.jsp");
                return;
            }
            Employee emp = (Employee) session.getAttribute(Const.CURRENT_USER);
            if (!Authentication.isHRAdmin(emp)&&!Authentication.isExpressAdmin(emp)
                    &&!Authentication.isExpressCourier(emp)&&!Authentication.isExpressAreaManager(emp)&&
                    !Authentication.isExpressLogisticsApproval(emp)&&!Authentication.isExpressLogisticsManager(emp)) {
                response.sendRedirect("404.jsp");
                return;
            }
            if (Authentication.isSuperManager(emp)) {
                response.sendRedirect("express_courier.jsp");
                return;
            }
            if (Authentication.isExpressCourier(emp)) {
                response.sendRedirect("express_courier.jsp");
                return;
            }
            if (Authentication.isExpressAreaManager(emp)) {
                response.sendRedirect("express_area_manager.jsp");
                return;
            }
            if (Authentication.isExpressLogisticsApproval(emp)) {
                response.sendRedirect("express_logistics_approval.jsp");
                return;
            }
            if (Authentication.isExpressLogisticsManager(emp)) {
                response.sendRedirect("express_logistics_manager.jsp");
                return;
            }
        %>

        <script src="static/js/modernizr.custom.25376.js" type="text/javascript"></script>
        <script src="static/js/jquery.js" type="text/javascript"></script>
        <script src="static/js/common-script.js" type="text/javascript"></script>
        <script src="static/dist/js/jquery.secretnav.js" type="text/javascript"></script>
        <script src="static/js/jquery.edbox.js" type="text/javascript"></script>
        <script src="static/js/selectpage.js" type="text/javascript"></script>
    </body>
</html>
